<?php
// application/forms/Tblentreprise.php
class Application_Form_Tblentreprise extends OMNZend_Form
{
       public function init()
       {
           // Set the method for the display form to POST
           $this->setMethod('post');
           // Add the Id element
           $this->addElement('text', 'id', array(
               'label'      => 'Id',
               'required'   => true,
               'validators' => array(
                   array('validator' => 'StringLength', 'options' => array(0, 20))
                   )
           ));
           // Add the Industry_id element
           $this->addElement('text', 'industry_id', array(
               'label'      => 'Industry_id',
               'required'   => true,
               'validators' => array(
                   array('validator' => 'StringLength', 'options' => array(0, 20))
                   )
           ));
           // Add the Siret element
           $this->addElement('text', 'siret', array(
               'label'      => 'Siret',
               'required'   => true,
               'validators' => array(
                   array('validator' => 'StringLength', 'options' => array(0, 20))
                   )
           ));
           // Add the Last_updated_on element
           $this->addElement('text', 'last_updated_on', array(
               'label'      => 'Last_updated_on',
               'required'   => true,
               'validators' => array(
                   array('validator' => 'StringLength', 'options' => array(0, 20))
                   )
           ));

           // Add a captcha
           $this->addElement('captcha', 'captcha', array(
               'label'      => 'Please enter the 5 letters displayed below:',
               'required'   => true,
               'captcha'    => array(
                   'captcha' => 'Figlet',
                   'wordLen' => 5,
                   'timeout' => 300
               )
           ));

           // Add the submit button
           $this->addElement('submit', 'submit', array(
               'ignore'   => true,
               'label'    => 'Add Tblentreprise',
           ));

           // And finally add some CSRF protection
           $this->addElement('hash', 'csrf', array(
               'ignore' => true,
           ));
       }
}
